MAPS

Anyone can see a forest fire. Skill lies in sniffing the first smoke…
— Robert A. Heinlein
The Amazon Dashboard tracks individual fires in the Amazon region using a new approach to cluster and classify VIIRS active fire detections by fire type. Based on the fire location, intensity, duration, and spread rate, each individual event is classified as a deforestation fire, understory forest fire, small clearing & agricultural fire, or savanna fire.
df <- read.csv("archetypes/amazon-rainforest-on-fire/fire-atlas-jan-july.csv", header = TRUE, stringsAsFactors = FALSE)
head(df, n=10)
cities <- read.csv("archetypes/amazon-rainforest-on-fire/brazil-cities.csv", header = TRUE, stringsAsFactors = FALSE, fileEncoding = "utf-8")
head(cities, n=10)
df_new <- filter(df, is_new == 1)
df_new <- filter(df_new, is_active == 1)
df_new <- filter(df_new, confidence == 3)
# to use for manual (discrete) color scale
df_new <- df_new %>% mutate(fire_type = as.character(fire_type))
# head(df_new, n=10)
ne_world <- ne_countries(scale = "small", returnclass = "sf")
# ne_world <- filter(ne_world, iso_a3 == "BRA")
adm1 <- st_read("archetypes/amazon-rainforest-on-fire/bra_admbnda_adm1_ibge_2020.geojson")
## Reading layer `bra_admbnda_adm1_ibge_2020' from data source
## `C:\Users\jaybe\Desktop\kamino-public\kamino-source\sources\10-maps\3-point\8-dot\archetypes\amazon-rainforest-on-fire\bra_admbnda_adm1_ibge_2020.geojson'
## using driver `GeoJSON'
## Simple feature collection with 27 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -73.99047 ymin: -33.75077 xmax: -28.84917 ymax: 5.271131
## Geodetic CRS: WGS 84
# bosque_protector <- st_read("archetypes/amazon-rainforest-on-fire/bosque-protector.geojson")
# departamental <- st_read("archetypes/amazon-rainforest-on-fire/departamental.geojson")
# nacional <- st_read("archetypes/amazon-rainforest-on-fire/nacional.geojson")
# reserva_florestal <- st_read("archetypes/amazon-rainforest-on-fire/reserva-florestal.geojson")
theme_opts <- theme(
panel.background = element_rect(fill="#b9d2df", colour="white"),
plot.background = element_blank(),
legend.position = "none"
)
# to limit bounds of map view
xmin <- min(df_new$x)
xmax <- max(df_new$x)
ymin <- min(df_new$y)
ymax <- max(df_new$y)
fire_types <- c(
"1" = "#77c3ff", # savanna and grassland
"2" = "#e7ac03", # small clearing and agriculture
"3" = "#6ba61b", # understory
"4" = "#8d1900" # deforestation fires
)
v1 <- ggplot(data = ne_world) +
geom_sf(fill="#f1efe9", color="#bbadbc", stroke=0.5) +
geom_sf(data = adm1, fill=NA, color="#B2DFDB", stroke=0.5, alpha = 0.2 ) +
# geom_sf(data = bosque_protector, fill="white", color="#B2DFDB", stroke=0.5, alpha = 0.2 ) +
# geom_sf(data = departamental, fill="white", color="#B2DFDB", stroke=0.5, alpha = 0.2 ) +
# geom_sf(data = nacional, fill="white", color="#B2DFDB", stroke=0.5, alpha = 0.2 ) +
# geom_sf(data = reserva_florestal, fill="white", color="#B2DFDB", stroke=0.5, alpha = 0.2 ) +
geom_point( data = df_new, aes(x = x, y = y, size = frp), shape = 21, color = "white", fill = "white", stroke = 3.0, alpha=0.4) +
geom_point( data = df_new, aes(x = x, y = y, color = fire_type, fill = fire_type, size = frp), shape = 21, alpha=0.8) +
geom_point( data = cities, aes(x = lng, y = lat), size = 2, color = "#333333", alpha=1.0) +
scale_size_continuous(range=c(2,12)) +
scale_color_manual ( values = fire_types ) +
scale_fill_manual ( values = fire_types ) +
coord_sf(xlim = c(xmin, xmax), ylim = c(ymin, ymax)) +
labs(x = NULL,
y = NULL,
title = "Amazon Rainforest Fires",
subtitle="January to July, 2021") +
theme_bw() +
theme_opts
girafe(ggobj = v1, width_svg = 16, height_svg = 15,
options = list(opts_sizing(rescale = TRUE, width = 0.65)))